import Axios from "axios";
import Qs from 'qs'
export default {
    /**
     * 获取过滤器列表
     */
    getAllMatchUrl: function ({taskId,currentPage,pageSize}) {
            const params={
            page : currentPage,
            rows : pageSize,
            taskId : taskId
            };
       return Axios.post('/crawler/api/parser/getAllMatchUrl/page',Qs.stringify(params),{headers: {'Content-Type': 'application/x-www-form-urlencoded'}});
    },
    addMatchUrl : function (params){
       return Axios.post('/crawler/api/parser/addMatchUrl', params);
    },
    updateMatchUrl : function (params){
       return Axios.post('/crawler/api/parser/updateMatchUrl', params);
    },
    deleteFilter : function (params){
       return Axios.post('/crawler/api/parser/deleteByTaskIdAndRegexAndRule', params);
    },
    insertMatchUrlPlug : function (params){
        return Axios.post('/crawler/api/parser/insertMatchUrlPlug', params);
    },
    deleteBymatchUrlId:function ({matchUrlId}){
      const params={
        matchUrlId : matchUrlId,
      };
      return Axios.post('/crawler/api/parser/deleteMatchUrl', Qs.stringify(params),{headers: {'Content-Type': 'application/x-www-form-urlencoded'}});
    },

}
